module.exports = app => {
  const { router, controller } = app;// 结构


  const search = '/api/m/search'; // 开启路由前缀

  // 搜索文章 带用户搜索记录
  router.get(`${search}/keyword`, controller.m.article.getArticle);

  // 获取用户搜索历史记录
  router.get(`${search}/getUserHistory`, controller.m.search.getUserHistory);

  // 获取热门搜索
  router.get(`${search}/getHotSearch`, controller.m.search.getHotSearch);
  // 删除单条用户搜索历史记录
  router.delete(`${search}/delRowSearchHistory/:id`, controller.m.search.delRowSearchHistory);
  // 删除用户所有搜索历史记录
  router.delete(`${search}/delAllSearchHistory`, controller.m.search.delAllSearchHistory);


};
